<html>
<head>
<title>TESTING MAIN</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
		

		
        <script type="text/javascript">
		
		function makeHttpObject() {
		  try {return new XMLHttpRequest();}
		  catch (error) {}
		  try {return new ActiveXObject("Msxml2.XMLHTTP");}
		  catch (error) {}
		  try {return new ActiveXObject("Microsoft.XMLHTTP");}
		  catch (error) {}

		  throw new Error("Could not create HTTP request object.");
		}
		</script>


</head>
<body>

<div id="wrapper">
	<div id="page">
		<div id="page-bgtop">
			<div id="page-bgbtm">
				<div id="content">
					
					<div class="post">
						<h2 class="title" style="text-align:center" >Welcome to DocsPoller!</h2>
						<p class="meta"><span class="date">October 2010</span><span class="posted">Made by <a href="www.badgerInc.gse.co">Badger Inc.</a></span></p>
						<div style="clear: both;">&nbsp;</div>
						<div class="entry">
							<p>This is DocsPoller! This is the frontend for an application which is supposed to bring voting data from Google Docs </p>
							<p>Docspoller is designed to be highly scalable and extensible in hand, able to work with many Doc sheet formats</p>
							<p class="links"><a href="http://code.google.com/p/docs-poller/">Read More</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
						</div>
					</div>
					
					<div class="post">
						<h2 class="title" style="text-align:center">DocsPoller Results!</h2>
						<br>
						<div id="tableArea" style="clear: both;">
						
						</div>
						<div style="clear: both;">&nbsp;</div>
						<p style="text-align:center">-</p>
					</div>
					
					<div class="post">
						<h2 class="title" style="text-align:center">DocsPoller App!</h2>
						<br>
						<div style="clear: both;">&nbsp;</div>
						<div class="entry",id="entry">
							<input type="text" id="keyInput" size="25" value="">
							<p><button id="buttonGD">Get Data</button></p>
							<p><button id="buttonRS">Send HTTPREQ</button></p>
								<script type="text/javascript">
									//
									document.getElementById("buttonRS").onclick = function()
									{
										var objt = {};
										var request = makeHttpObject();
										objt.name = document.getElementById("keyInput").value;
										request.open("GET", "http://127.0.0.1:9292/database/"+objt.name, true);
										request.send(null);
										request.onreadystatechange = function() {
										  if (request.readyState == 4)
											console.log(request.responseText.length);
											console.log(request.responseText);
										};
										
									}
								</script>
						</div>
					</div>
					
					<div class="post">
						
						<div style="clear: both;">&nbsp;</div>
						<div class="entry">
							<p><b>Textfield :</b> Field for the Key found on the docs table </p>
							<p>For all keys in the country, including the country itself, click <a href="https://spreadsheets.google.com/pub?key=0Amhf1qkV0GFFdEE2VnZFRlZsVW05a3Y0ckpIMy1mNnc&hl=en&output=html">here.</a> </p>
							<p>Docspoller is able to work with any country or region key that is provided and has a familiar formal</p>
							<p><b>Get Data:</b> Fetches and prints the data from the sheet network</p>
							<p><b>Reset:</b> Resets the request. Bear in mind it does not clean any cache</p>
						</div>
					</div>
					
					<div style="clear: both;">&nbsp;</div>
				</div>
				<!-- end #content -->
				
				
				<div style="clear: both;">&nbsp;</div>
			</div>
		</div>
	</div>
	<!-- end #page -->
</div>


</body>
</html>